home *** CD-ROM | disk | FTP | other *** search
- Path: prairienet.org!wemccaug
- From: wemccaug@prairienet.org (Wendy E. McCaughrin)
- Newsgroups: comp.lang.c
- Subject: Re: Search routines
- Date: 21 Apr 1996 03:31:53 GMT
- Organization: University of Illinois at Urbana
- Message-ID: <4lca79$f86@vixen.cso.uiuc.edu>
- References: <3179B683.4722@neosoft.com> <31741C46.2DF2@stc.net>
- Reply-To: wemccaug@prairienet.org (Wendy E. McCaughrin)
- NNTP-Posting-Host: firefly.prairienet.org
-
-
- In a previous article, laxrl@neosoft.com (Reuven Lax) says:
-
- >dmaher@stc.net wrote:
- >>
- >
- > I am searching for
- >> information on search routines. I need at least five, and I was
- >> wondering if anybody could help me out. I'm aware of binary and
- >> sequential searches for C++, but I really need at least 3 or 4 more.
- >
- >Well, you have the Boyer-Moore algorithm, and the Knuth-Morris-Prat (a
- >mouthfull) algorithm, for unordered dsts structures. Binary search is
- >for ordered data structers. If you build a b-tree out od your data that
- >also signficately improves your search speed. Another popular method,
- >is hashing. You might want to look some of these up (that is if your
- >not familiar with any of them).
- >
- >Reuven Lax
-
- The KMP and BM algorithms are string-matching algorithms, not
- general search schemes. For an excellent rendition on these and other
- pattern-matching approaches, you should read Bruce Watson's Ph.D.
- dissertation, available from (I believe) University of Amsterdam, the
- Netherlands.
-
- However, the mistake is understandable, given the generality of
- searching as an activity in general (w.v., Knuth, Vol. III). In fact,
- I suppose BM and KMP can be regarded as searches in the simplest kind
- of data-structure, the chracter-vector 'string'. Binary and sequential
- searches occur in the next level up: the string-vector of "names".
-
- Hashing isn't really a search method (which is why Knuth discusses it in
- Vol. II, not Vol. III) but is instead an indexing method.
-
- Search strategies are often characterized by the data-structures they
- get applied to, most notably, trees. Thus level-order (also called
- "breadth-first order") and depth-first order search apply to acyclic
- graphs connected graphs (trees).
-
- wem
-
-